<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../layuiAdmin/layui/css/layui.css" media="all">
    <style>
        .layui-form-select dl {
            max-height: 200px;
        }
    </style>
</head>

<body>
    <div class="layui-form layui-form-pane" id="popup-from" style="padding: 20px 30px 0 30px;">
        <input type="text" name="cId" value="" style="display: none;" />
        <div class="layui-form-item layui-row layui-col-space10">
            <div class="layui-col-xs12">
                <label class="layui-form-label">标题</label>
                <div class="layui-input-block">
                    <input type="text" name="lablename" lay-verify="required" placeholder="请输入标题" autocomplete="off"
                        class="layui-input">
                </div>
            </div>
            <div class="layui-col-xs12">
                <label class="layui-form-label">搜索字段</label>
                <div class="layui-input-block">
                    <select name="field" lay-verify="required" lay-search>
                    </select>
                </div>
            </div>
            <div class="layui-col-xs12">
                <label class="layui-form-label">宽度</label>
                <div class="layui-input-block">
                    <input type="text" name="width" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-col-xs12">
                <label class="layui-form-label">排序</label>
                <div class="layui-input-block">
                    <input type="text" name="sortCode" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item layui-layout-admin layui-hide">
            <div class="layui-input-block">
                <div class="layui-footer" style="left: 0; text-align: right">
                    <button class="layui-btn" lay-filter="form-submit" id="form-submit" type="button" lay-submit>
                        立即提交
                    </button>
                </div>
            </div>
        </div>
    </div>
    <script src="../../layuiAdmin/layui/layui.js"></script>
    <script>
        layui.config({
            base: '../../layuiAdmin/', //静态资源所在路径
            version: top.layui.setter.version
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'form'], function () {
            var $ = layui.$,
                form = layui.form,
                admin = layui.admin;
            var tableName = $.getParam("tableName");
            $("select[name='field']").SetSelect({
                url: '/api/Code/GetTableFiled?tableName=' + tableName,
                id: 'column',
                text: 'remark',
                async: false,
                success: function (r) {
                    form.render('select');
                }
            });
        })
    </script>
</body>

</html>